#include <iostream>
#include <string>
using namespace std;

int main()
{
	string str;
	string temp;
	string ret;
	getline(cin, str);
	int len = str.size();
	if (len == 0 || len > 255){
		return 0;
	}
	int  nums = 0;
	for (int i = 0; i < len; ++i){
		if (str[i] >= '0' && str[i] <= '9'){
			nums++;
			temp.push_back(str[i]);
		}
		else if (nums){   //如果不是数字，且nums不为0
			if (nums > ret.size()){
				ret = temp;
			}
			temp.clear();
			nums = 0;
		}
	}
	if (temp.size() > ret.size()){
		ret = temp;
	}
	cout << ret;
	return 0;
}